(module syntax mzscheme

  (require "require.ss")
  (require-contracts)
  (require-etc)

  (provide/contract
   [syntax-concat (identifier? identifier? . -> . identifier?)]
   [syntax-prefix (string? identifier? . -> . identifier?)]
   [syntax-suffix (identifier? string? . -> . identifier?)]
   [id->string (identifier? . -> . string?)]
   [string->id (string? . -> . identifier?)])

  (define (syntax-concat one two)
    (string->id (string-append (id->string one) (id->string two)) two))

  (define (syntax-prefix prefix name)
    (string->id (string-append prefix (id->string name)) name))

  (define (syntax-suffix name suffix)
    (string->id (string-append (id->string name) suffix)))

  (define (id->string id)
    (symbol->string (syntax-e id)))

  (define string->id
    (opt-lambda (str [context #f])
      (datum->syntax-object context (string->symbol str) context context)))

  )